requirejs.config({
    //By default load any module IDs from js/app
    baseUrl:'js',
    waitSeconds: 2000,
    //except, if the module ID starts with "app",
    //load it from the js/app directory. paths
    //config is relative to the baseUrl, and
    //never includes a ".js" extension since
    //the paths config could be for a directory.
    paths: {
        "angular":"lib/angular/angular.min",
        "angular-resource":"lib/angular-resource/angular-resource.min",

        "jquery":"lib/jquery.min",
        "jquery-ui-custom":"lib/jquery.ui.custom",
        "jquery-flot":"lib/jquery.flot.min",
        "jquery-flot-resize":"lib/jquery.flot.resize.min",
        "jquery-peity":"lib/jquery.peity.min",
        "jquery-gritter":"lib/jquery.gritter.min",
        "jquery-validate":"lib/jquery.validate",
        "jquery-wizard":"lib/jquery.wizard",
        "jquery-uniform":"lib/jquery.uniform",
        "jquery-dataTables":"lib/jquery.dataTables.min",

        "excanvas":"lib/excanvas.min",
        
        "bootstrap":"lib/bootstrap.min",
        
        "fullcalendar":"lib/fullcalendar.min",

        "select2":"lib/select2.min",

        "matrix":"lib/matrix",
        "matrix-dashboard":"lib/matrix.dashboard",
        "matrix-interface":"lib/matrix.interface",
        "matrix-chat":"lib/matrix.chat",
        "matrix-form-validation":"lib/matrix.form_validation",
        "matrix-popover":"lib/matrix.popover",
        "matrix-tables":"lib/matrix.tables"
    },
    shim:{
        "angular":{
            //These script dependencies should be loaded before loading
            deps:['jquery'],
            //Once loaded, use the global 'Backbone' as the
            //module value.
            exports:"angular"
        },
        "angular-resource":{
            deps:['angular']
        },
        "jquery-ui-custom":{
            deps: ["jquery"],
            exports: "jqueyr-ui-custom"
        },
        "jquery-gritter":{
            deps:['jquery']
        },
        "jquery-validate":{
            deps:['jquery']
        },
        "jquery-wizard":{
            deps:['jquery','jquery-ui-custom']
        },
        "jquery-uniform":{
            deps:['jquery']
        },
        "jquery-peity":{
            deps:['jquery']
        },
        "jquery-flot":{
            deps:['jquery']
        },
        "jquery-flot-resize":{
            deps:['jquery','jquery-flot']
        },
        "matrix":{
            deps:["jquery",'jquery-gritter']
        },
        "matrix-dashboard":{
            deps:['jquery','jquery-peity','matrix']
        },
        "matrix-interface":{
            deps:['jquery','matrix']
        },
        "matrix-chat":{
            deps:['jquery','matrix']
        },
        "matrix-form-validation":{
            deps:['jquery','matrix']
        },
        'matrix-popover':{
            deps:['jquery','matrix']
        },
        "matrix-tables":{
            deps:['jquery','matrix']
        },
        "fullcalendar":{
            deps:['jquery']
        },
        "select2":{
            deps:['jquery']
        },
        "bootstrap":{
            deps:['jquery']
        }
    },
    config: {
        //Set the config for the i18n
        //module ID
        //note:(sxf)i18n module load from baseUrl=/js/app
        i18n: {
            locale: 'zh-cn'
        }
    }
});


// Start the main app logic.
require(['angular','excanvas','jquery','jquery-ui-custom','bootstrap','jquery-flot','jquery-flot-resize',
    'jquery-peity',
    'fullcalendar','matrix',
    'matrix-dashboard','jquery-gritter','matrix-interface','matrix-chat','jquery-validate',
    'matrix-form-validation','jquery-wizard','jquery-uniform','select2','matrix-popover',
    'jquery-dataTables','matrix-tables'],function() {
    //do nothing,just load javascript

    //jQuery, canvas and the app/sub module are all
    //loaded and can be used here now.
});